<template>
  <div class="log-main">
    <div class="both-ends">
      <i class="fa fa-calendar-check-o fa-fw"></i>狐若
    </div>
    <div class="time-line"></div>
    <div class="time-year" v-for="(item, index) in 2" :key="index">
      <div class="year">
        202{{ item }}年<i class="fa fa-sort-desc fa-fw" aria-hidden="true"></i>
      </div>
      <div class="month" v-for="(item, index) in 5" :key="index">
        <div class="date">08月26日</div>
        <p class="icon"><i class="fa fa-bullseye"></i></p>
        <p class="content">
          博客正式上线，这也是我第一个网站。博客正式上线，这也是我第一个网站。博客正式上线，这也是我第一个网站。博客正式上线，这也是我第一个网站。
        </p>
      </div>
    </div>
    <div class="both-ends">
      <i class="fa fa-hourglass-start fa-fw"></i>Origin
    </div>
  </div>
</template>

<script>
export default {};
</script>
<style lang='scss' scoped>
.log-main {
  position: relative;
  .both-ends {
    position: relative;
    left: calc(18% - 12px);
    background: #fff;
    padding: 5px 0;
    z-index: 1;
    font-size: 20px;
    font-weight: bold;
    color: #555;
  }
  .time-line {
    position: absolute;
    top: 0;
    left: 18%;
    width: 2px;
    height: 100%;
    background: #f5f5f5;
    border-radius: 4px;
  }
  .time-year {
    margin: 10px 0;

    .year {
      width: 16%;
      font-size: 18px;
      text-align: right;
    }

    .month {
      margin: 15px 0;
      .date {
        float: left;
        width: 16%;
        font-size: 14px;
        color: #555;
        text-align: right;
      }
      .icon {
        float: left;
        width: 4%;
        text-align: center;
        background: #fff;
        color: #555;
        position: relative;
        z-index: 1;
      }
      .content {
        border-radius: 10px;
        display: inline-block;
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        position: relative;
        max-width: 70%;
        padding: 15px;
        margin: 0 0 0 10px;
        &::before {
          position: absolute;
          left: -20px;
          top: 8px;
          height: 0;
          width: 0;
          content: "";
          border-top: 4px solid transparent;
          border-left: 10px solid transparent;
          border-bottom: 10px solid transparent;
          border-right: 10px solid rgba(0, 0, 0, 0.5);
        }
      }
    }
  }
}
</style>